package com.jia.rpc.example.consumer;

import com.jia.rpc.config.RpcConfig;
import com.jia.rpc.example.common.UserService;
import com.jia.rpc.example.common.model.User;
import com.jia.rpc.proxy.ServiceProxyFactory;
import com.jia.rpc.utils.ConfigUtils;

public class ConsumerExample {
    public static void main(String[] args) {
        //获取代理
        UserService userService = ServiceProxyFactory.getMockProxy(UserService.class);
        User user = new User();
        user.setName("jiajia");
        System.out.println(userService.getUser(user));
//        RpcConfig rpcConfig = ConfigUtils.loadConfig(RpcConfig.class,"rpc");
//        System.out.println(rpcConfig);
    }
}
